<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AltercouponExtensionAddChannelId extends Migrator
{
    public function up()
    {
        $this->table('coupon_extension')
            ->addColumn('channel_id', 'integer', ['limit' => 15, 'default' => 0, 'comment' => '渠道id'])
            ->addColumn('agent_id', 'integer', ['limit' => 15, 'default' => 0, 'comment' => '代理id'])
            ->update();


    }

    public function down()
    {

        $this->table('coupon_extension')
            ->removeColumn('channel_id')
            ->removeColumn('agent_id')
        ;
    }
}
